<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<script>
    var num = 10;
    fun();
    function fun(){
        console.log(num);
        var num = 20;
    }
    var a = 18;
    f1();
    function f1(){
        var b=9;
        console.log(a);
        console.log(b);
        var a = '123';
    }
    function f1(){
        var b=9;
        var a;
        console.log(a);
        console.log(b);
        a = '123';
        console.log(a);
    }
</script>
</body>
</html>